from uiautomator import device as d

# d.swipe(sx, sy, ex, ey)
# d.swipe(100, 500, 100, 500)

# 获得 orientation
d.orientation

# 设置 Orientation
d.orientation = "left"  # or "right", "natural"

# 冻结/解除冻结屏幕rotation
d.freeze_rotation()
d.freeze_rotation(False)


print(d.info)